<template>
  <div class="details">
    <header-temp :gid='$route.query.gid' :title='lottery[$route.query.gid].name' :headType='$route.meta.headType' isBackIcon='1'></header-temp>
    <!-- 图片 -->
    <div class="containier">
      <div class="containie_img">
        <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
          <van-swipe-item
            v-for="(item,index) in imgname"
            v-if="item.isSensitivel==0 && isShowbu==0"
            
            @click="goUrl(item)"
          >
            <img :src="keyUrl+item.image" />
          </van-swipe-item>
          <van-swipe-item
            v-if="isShowbu == !0"
            v-for="(item,index) in imgname"
            
            @click="goUrl(item)"
          >
            <img :src="keyUrl+item.image" />
          </van-swipe-item>
        </van-swipe>
      </div>

      <!-- 循环这个 -->
      <div class="containier_box">
        <div :class="gaopon ? 'details_box':'newBoxStyle' " :style='lottery[gid].type==2?"height:1.35rem":""'>
          <div class="details_box_top">
            <div class="details_box_first">
              <h1>第{{pid}}期</h1>
              <span class="keng">
                {{awardtime}} {{awardWeek}}
                <i style="font-style:normal" class="icent"></i>
              </span>
            </div>
            <div class="right_btn">
              <div
                class="details_btn"
                @click="handshow"
                :style="historyBoolean ? ' ':'visibility:hidden'"
              >直播回放</div>
              <div class="details_btn" @click="handgohistory">更多期次</div>
            </div>
          </div>
          

          <!-- 小球 -->
          <!-- class="box_list" 全套大保健-->
          <!-- class="bjball"   北京独特的某一个 -->

          <ul :class="this.second==1003 || this.second== 1004 ?  'bjball':'box_list'">
            <li
              v-for="(item,index) in redList"
              
              :class="arrlengtj>=9 || second=='82'? 'newLI':''"
            >{{item}}</li>
            <li v-for="(item,index) in BlueList"  class="blue">{{item}}</li>
          </ul>

          <!-- 全国销量展示 -->
          <ul class="box_shop" v-if="gidType==0||gidType==1">
            <li>
              <div class="query_shop">本期全国销量</div>
              <div class="query_num">{{realsale}}</div>
            </li>
            <li>
              <div class="query_shop">累计奖池</div>
              <div class="query_num">{{realmoney}}</div>
            </li>
          </ul>

          <!-- 专家推荐 -->
          <template v-if='gid == "01"'>
            <div class="exper-info" @click.stop='goUrl({"url":exper101.responseUrl,"type":"change"})'>
              <p>自己买不中，去看看专家推荐 ></p>
            </div>
          </template>
          <template v-if='gid == "50"'>
             <div class="exper-info" @click.stop='goUrl({"url":exper201.responseUrl,"type":"change"})'>
              <p>自己买不中，去看看专家推荐 ></p>
            </div>
          </template>
          <template v-if='gid == "03"'>
             <div class="exper-info" @click.stop='goUrl({"url":exper102.responseUrl,"type":"change"})'>
              <p>自己买不中，去看看专家推荐 ></p>
            </div>
          </template>
          <template v-if='gid == "53"'>
             <div class="exper-info" @click.stop='goUrl({"url":exper202.responseUrl,"type":"change"})'>
              <p>自己买不中，去看看专家推荐 ></p>
            </div>
          </template>
          <template v-if='gid == "80"'>
             <div class="exper-info" @click.stop='goUrl({"url":exper401.responseUrl,"type":"change"})'>
              <p>自己买不中，去看看专家推荐 ></p>
            </div>
          </template>
        </div>

        

        <!-- 奖项表 -->
        <div style="background:#fff;padding:.1rem .15rem" v-if="tableShow">
          <table :class="tableplay ? '':'jiangli'">
            <thead>
              <tr>
                <th>奖项</th>
                <th v-if="tableplay">中奖条件</th>
                <th>中奖注数</th>
                <th>单注奖金(元)</th>
              </tr>
            </thead>

            <tbody>
              <tr v-for="(item,index ) in gonggaoListAyy" >
                <td>{{item.name}}</td>
                <td v-if="tableplay">{{item.playmethod}}</td>
                <td>{{item.num}}</td>
                <td>{{item.allNum.indexOf('.00')>-1?item.allNum.split('.')[0]:item.allNum}}</td>
              </tr>
            </tbody>
          </table>
        </div>
        <div style="background:#fff;padding:.1rem .15rem;margin-top:.1rem; " v-if="match">
          <table>
            <thead class="headertab">
              <tr>
                <th>场次</th>
                <th>对阵</th>
                <th>比分</th>
                <th>赛果</th>
              </tr>
            </thead>
            <tbody>
              <tr v-for="(item,index ) in this.match" >
                <td>{{item.matchid}}</td>
                <td>
                  {{item.mname}}
                  <span style="margin:0 .1rem; color:#999; ">VS</span>
                  {{item.sname}}
                </td>
                <td>{{item.mscore}}:{{item.sscore}}</td>
                <td>{{item.result}}</td>
              </tr>
            </tbody>
          </table>
        </div>
        
        <div style="background:#fff;margin-top:.1rem;">
          <ul class="tabbar_bottom">
            <li @click="zst" v-if="zstBoolean">走势图</li>
            <!-- <li @click="information">资讯</li> -->
            <li @click="handplay" :sex="this.pid" awardtime="awardtime">玩法介绍</li>
          </ul>
        </div>
        
        <div style="background:#fff; padding:0 .15rem .15rem" v-if='especialGids.indexOf(this.$router.currentRoute.query.gid)< 0'>
            <div class="footer">热门资讯</div>
            <div class="borderbtn">
              <ul>
                <li
                  v-for="(itema,index) in hotlist"
                  
                  @click="informationa(itema)"
                >{{itema.title}}</li>
              </ul>
            </div>
        </div>

        <img :src="PhoneShow" class="block" @click="gobaidu" v-if="isShowbu == 1" />
      </div>

      <!-- 5个特殊彩种 -->
      <template v-if='especialGids.indexOf(gid)>-1'>
        <div class="especial-box">
          <div class="title" v-if='recommendsData.bigPrize ==1'>大奖专区</div>
          <template v-if='recommendsData.bigPrize ==1'>
            <div class="especial-box-item" v-for='(item,index) in recommendsDataArrayBigPrize'>
                <div class="grandPrix" >
                  <div class="grandEx">
                    <a :href="'http://myq.15988.com/#/public/expertHome/'+item.jcobMemberId">
                    <img :src="item.icon" onerror="this.src='//rm.aicai.com/wap5/images/user_img.png'">
                    </a>
                    <div class="fs24 c333">{{item.nickName}}</div>
                  </div>
                  <div class="rightTxt tac">
                      <div class="winBox">
                        <p>推荐命中{{item.tjInterpretationPrizeLevel.prizeCount}}注{{item.tjInterpretationPrizeLevel.prizeLevel}}等奖</p>
                        <p>总奖金 {{item.prizes}} {{item.amountType==1?'万':''}}元</p>
                      </div>
                      <a :href="'http://myq.15988.com/#/tjInterpretation/'+item.interId">{{lotteryname}} {{pid}}期推荐&gt;</a>
                    </div>
                </div>
                <div class="title2">TA的命中推荐</div>
                <template v-if='item.unOpenTj'>
                  <div class="con">
                    <a :href="'http://myq.15988.com/#/tjInterpretation/'+item.interId">
                      <h3>{{item.unOpenTj.title}}</h3>
                      <div class="match">
                        <div class="left">
                                <div class="line">
                                    <em class="c999">{{lotteryname}}</em>
                                    <em class="c333 ml50">{{item.unOpenTj.issueNo}}期</em>
                                    <em class="c999 ml50">{{item.unOpenTj.showKaijiangDesc}}</em>
                                </div>
                          </div>
                          <i class="icon-v-right"></i>
                      </div>
                    </a>
                  </div>
                  <div class="bottomInfo">
                    <div class="left">
                      <span>{{item.unOpenTj.saleEndtime}}截止</span>
                    </div>
                    <div class="look"><i class="spriteI"></i>{{item.unOpenTj.lookerCount}}</div>
                    <div class="money"><i class="wd_icon_gold"></i>{{item.unOpenTj.price}}金币</div>
                  </div>
                </template>
                <template v-else='item.tjInterpretation'>
                  <div class="con">
                    <a :href="'http://myq.15988.com/#/tjInterpretation/'+item.interId">
                      <h3>{{item.tjInterpretation.title}}</h3>
                      <div class="match">
                        <div class="left">
                                <div class="line">
                                    <em class="c999">{{lotteryname}}</em>
                                    <em class="c333 ml50">{{item.tjInterpretation.issueNo}}期</em>
                                    <em class="c999 ml50">{{item.tjInterpretation.showKaijiangDesc}}</em>
                                </div>
                          </div>
                          <i class="icon-v-right"></i>
                      </div>
                    </a>
                  </div>
                  <div class="bottomInfo">
                    <div class="left">
                      <span>{{item.tjInterpretation.minRaceMatchTime | timeChange}}截止</span>
                    </div>
                    <div class="look"><i class="spriteI"></i>{{item.tjInterpretation.lookerCount}}</div>
                    <div class="money"><i class="wd_icon_gold"></i>{{item.tjInterpretation.price}}金币</div>
                  </div>
                </template>
            </div>
          </template>
          <div class="exListWrap whiteBlock especial-box-item">
            <div class="txtLine">
              <a href="javascript:;">
                <p>{{pid}}期共<span class="red" v-if='recommendsData.countInterHits'>{{recommendsData.countInterHits.hits}}</span>位专家推荐命中</p>
                <p v-if='recommendsData.countInterHits && recommendsData.countInterHits.prize != 0'>命中总奖金为<span class="red" v-if='recommendsData.countInterHits'>{{recommendsData.countInterHits.prize}}</span>{{recommendsData.countInterHits.amountType==1?'万':''}}元</p>
              </a>
            </div>
            <ul class="exList">
              <li v-for='(item,index) in recommendsDataArray'>
                <div class="img">
                  <a :href="'http://myq.15988.com/#/public/expertHome/'+item.jcobMemberId">
                  <img :src="item.icon"  onerror="this.src='//rm.aicai.com/wap5/images/user_img.png'">
                  </a>
                  <em>{{item.expertInterCount}}</em>
                </div>
                <p>{{item.nickName}}</p>
                <span v-if='item.prizes != "0"'>{{item.prizes}} {{item.amountType==1?'万':''}}元</span>
              </li>
            </ul>
          </div>
          
        </div>
        <div class="especial-box" style="background:#fff;">
          <div class="title3">{{pid}}期专家推荐</div>
          <div class="especial-box-item">
            <ul class="especial-box-item-list">
              <li v-for='(item,index) in recommendsArray'>
                    <div class="exper-top">
                      <a :href="'http://myq.15988.com/#/public/expertHome/'+item.jcobMemberResult.id">
                        <img class="exper_img" :src="item.jcobMemberResult.icon" alt="">
                        <div class="exper-top-right">
                          <p class="name">{{item.jcobMemberResult.nickName}}</p>
                          <span>命中：<i>{{item.leagueScore.d30WinRatio*100+'%'}}</i></span>
                        </div>
                      </a>
                    </div>
                    
                    <p v-html='item.tjInterpretationSimple.title' @click='goUrl({"url":"http://myq.15988.com/#/tjInterpretation/"+item.tjInterpretationSimple.id})'></p>
                    <div class="exper-com" @click='goUrl({"url":"http://myq.15988.com/#/tjInterpretation/"+item.tjInterpretationSimple.id})'>
                      <span>{{lotteryname}}</span>
                      <span class="color_333">{{item.tjInterpretationSimple.issueNo}}期</span>
                      <span>{{item.tjInterpretationSimple.raceStatusDesc}}</span>
                      <span class="icon_jt">></span>
                    </div>
                    <div class="bottomInfo" @click='goUrl({"url":"http://myq.15988.com/#/tjInterpretation/"+item.tjInterpretationSimple.id})'>
                        <div class="left">
                          <span class="fz12 color_999 mr10">{{item.tjInterpretationSimple.minRaceMatchTime | timeChange}}截止</span>|
                          <div class="look" style="width:23%; margin-left:10px;"><i class="spriteI"></i>{{item.tjInterpretationSimple.virLookerCount}}</div>
                        </div>
                        <div class="money"><i class="wd_icon_gold"></i>{{item.tjInterpretationSimple.price}}金币</div>
                    </div>
                
              </li>
            </ul>
          </div>
        </div>
      </template>
    </div>
  </div>
</template>


<script>
import {
  getLotteryDrawDetails,
  getAdvertiSense,
  getAdverti,
  getNewlists,
  hotlist
} from "../../api/whole";
import { instance2 } from "@/utils/http"
import { getbanner, getcontent } from "@/api/user";
import Vue from "vue";
import headerTemp from '@/components/head2'
export default {
  name: "Details",
  data() {
    return {
      especialGids:['01','50','03','53'],
      CHANGElIST: "",
      CHANGEARR: [],
      First: "",
      second: "",
      lotteryname: "",
      pid: "",
      awardWeek: "",
      awardtime: "",
      realsale: "",
      realmoney: "",
      gid: "",
      ballarry: [],
      redList: [], //红球
      BlueList: [], //篮球
      // 奖项 说明
      gonggaoList: [],
      gonggaoListAyy: [],
      tableShow: true,
      timeArr: ["01", "50", "03", "53", "52", "51", "07"],
      arrlengtj: "", //位数
      phoneIndex: "", //goodsPrice
      PhoneShow: "", //展示图片的地址
      match: "",
      goodid: "",
      type: "1",
      imgname: [],
      isBoolan: false, //图片显示
      backimgBolean: true,
      // godlist:[],
      banner: {
        banner1: "8", //彩种双色球banner广告
        banner2: "10", //彩种大乐透banner广告
        banner3: "12", //彩种七乐彩banner广告
        banner4: "13", //.彩种七星彩banner广告
        banner5: "14", //彩种福彩3Dbanner广告
        banner6: "15", //彩种排列三banner广告
        banner7: "16", //彩种排列五banner广告
        banner8: "17", //高频类彩种banner广告
        banner9: "18" //地方类彩种banner广告
      },
      // 图片参数
      image: "",
      timestampe: {
        cfrom: "h5"
      },

      timestampd: {
        cfrom: "h5"
      },
      tableplay: false,
      gaopon: true,
      historyBoolean: false,
      zstBoolean: true,
      isShowbu: "",
      iarea: "",
      hotlist: [],
      apicn: "http://h.198ty.com",
      gidType:'',
      // apicn: "/api"
      qgcGid:{
        '52':{
          name:'排列五',
          adUrl:'pl5_active',
          imgUrl:'52.png'
        },
        '53':{
          name:'排列三',
          adUrl:'pl3_active',
          imgUrl:'53.png',
          typeID:'202',
        },
        '50':{
          name:'超级大乐透',
          adUrl:'dlt_active',
          imgUrl:'50.png',
          typeID:'201',
        },
        '51':{
          name:'七星彩',
          adUrl:'qxc_active',
          imgUrl:'51.png'
        },
        '07':{
          name:'七乐彩',
          adUrl:'qlc_active',
          imgUrl:'07.png'
        },
        '03':{
          name:'福彩3D',
          adUrl:'3d_active',
          imgUrl:'03.png',
          typeID:'102',
        },
        '01':{
          name:'双色球',
          adUrl:'ssq_active',
          imgUrl:'01.png',
          typeID:'101',
        },
      },
      recommendsArray:[],
      recommendsDataArray:[],
      recommendsDataArrayBigPrize:[],
      recommendsData:{},
      ssqLotteryData:'0,2,4',//双色球开奖日期
      dltLotteryData:'1,3,6', //大乐透开奖日期
      exper101:{},
      exper102:{},
      exper201:{},
      exper401:{},
    };
  },
  components: {
    headerTemp
  },
  methods: {
    //获取专家命中信息
    getExperInfo(){
      instance2({
        url: "/static/jcob/js/kjgg_experHitInfo.js",
      }).then(v=>{
        let experHitInfo = v.data;
        this.exper101 = experHitInfo['101']
        this.exper201 = experHitInfo['201']
        this.exper102 = experHitInfo['102']
        this.exper202 = experHitInfo['202']
        this.exper401 = experHitInfo['401']
      })
    },
    isLotteryData(){
      let week = new Date().getDay();
      if (this.gid == '01') {//双色球
        if (this.ssqLotteryData.indexOf(week)>-1) {
          this.isShowbu = 1;
          console.count('isShowbu被调用了',this.isShowbu);
        }
      }
      if (this.gid == '50') {//大乐透
        if (this.dltLotteryData.indexOf(week)>-1) {    
          this.isShowbu = 1;
          console.count('isShowbu被调用了',this.isShowbu);
        }
      }
    },
    gethotlist() {
      hotlist(this.timestampd).then(res => {
        this.hotlist = res.data.data.data.slice(0, 10);
      });
    },
    informationa(itema) {
      this.$router.push({
        path: "/information",
        query: {
          id: itema.id,
          mid: itema.mid
        }
      });
    },
    zst() {
      this.$router.push({
        path: `/zst/${this.$router.currentRoute.query.gid}/1`
      });
    },
    handshow() {
      window.location.href = "http://www.cwl.gov.cn/kjxx/";
    },
    handgohistory() {
      this.$router.push({
        path: "/history",
        query: {
          gid: this.$router.currentRoute.query.gid,
          iarea: this.lotteryname
        }
      });
    },

    handback() {
      this.$router.back(-1);
    },
    // 玩法
    handplay() {
      this.$store.state.whreeCity = this.lotteryname;
      this.$router.push("/paly/" + this.$router.currentRoute.query.gid);
    },
    handgohome() {
      this.$router.push("/home");
    },

    //图片
    getAdverti() {
      getAdvertiSense({
        cfrom: "h5",
        position:this.gid
      }).then(res => {
        this.isShowbu = res.data.isShow;
        console.count('isShowbu被调用了 getAdverti',this.isShowbu);
        // this.isLotteryData();
        // alert('isShow是： '+res.data.isShow)
        if (this.second == "01") {
          getbanner({ banner: this.banner.banner1 }).then(res => {
            const arr = res.data.data.data;
            let ids = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
            let newArr = [];
            for (let i = 0; i < ids.length; i++) {
              for (let j = 0; j < arr.length; j++) {
                if (ids[i] == arr[j].order) {
                  newArr.push(arr[j]);
                }
              }
            }
            this.imgname = newArr;
          });
        } else if (this.second == "50") {
          getbanner({ banner: this.banner.banner2 }).then(res => {
            const arr = res.data.data.data;
            let ids = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
            let newArr = [];
            for (let i = 0; i < ids.length; i++) {
              for (let j = 0; j < arr.length; j++) {
                if (ids[i] == arr[j].order) {
                  newArr.push(arr[j]);
                }
              }
            }
            this.imgname = newArr;
          });
        } else if (this.second == "03") {
          getbanner({ banner: this.banner.banner5 }).then(res => {
            const arr = res.data.data.data;
            let ids = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
            let newArr = [];
            for (let i = 0; i < ids.length; i++) {
              for (let j = 0; j < arr.length; j++) {
                if (ids[i] == arr[j].order) {
                  newArr.push(arr[j]);
                }
              }
            }
            this.imgname = newArr;
          });
        } else if (this.second == "53") {
          getbanner({ banner: this.banner.banner6 }).then(res => {
            const arr = res.data.data.data;
            let ids = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
            let newArr = [];
            for (let i = 0; i < ids.length; i++) {
              for (let j = 0; j < arr.length; j++) {
                if (ids[i] == arr[j].order) {
                  newArr.push(arr[j]);
                }
              }
            }
            this.imgname = newArr;
          });
        } else if (this.second == "52") {
          getbanner({ banner: this.banner.banner7 }).then(res => {
            const arr = res.data.data.data;
            let ids = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
            let newArr = [];
            for (let i = 0; i < ids.length; i++) {
              for (let j = 0; j < arr.length; j++) {
                if (ids[i] == arr[j].order) {
                  newArr.push(arr[j]);
                }
              }
            }
            this.imgname = newArr;
          });
        } else if (this.second == "51") {
          getbanner({ banner: this.banner.banner4 }).then(res => {
            const arr = res.data.data.data;
            let ids = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
            let newArr = [];
            for (let i = 0; i < ids.length; i++) {
              for (let j = 0; j < arr.length; j++) {
                if (ids[i] == arr[j].order) {
                  newArr.push(arr[j]);
                }
              }
            }
            this.imgname = newArr;
          });
        } else if (this.second == "07") {
          getbanner({ banner: this.banner.banner3 }).then(res => {
            const arr = res.data.data.data;
            let ids = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
            let newArr = [];
            for (let i = 0; i < ids.length; i++) {
              for (let j = 0; j < arr.length; j++) {
                if (ids[i] == arr[j].order) {
                  newArr.push(arr[j]);
                }
              }
            }
            this.imgname = newArr;
          });
        } else if (this.lottery[this.gid].type == "1") {
          getbanner({ banner: this.banner.banner9 }).then(res => {
            const arr = res.data.data.data;
            let ids = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
            let newArr = [];
            for (let i = 0; i < ids.length; i++) {
              for (let j = 0; j < arr.length; j++) {
                if (ids[i] == arr[j].order) {
                  newArr.push(arr[j]);
                }
              }
            }
            this.imgname = newArr;
          });
        } else if (this.lottery[this.gid].type == "2") {
          getbanner({ banner: this.banner.banner8 }).then(res => {
            const arr = res.data.data.data;
            let ids = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
            let newArr = [];
            for (let i = 0; i < ids.length; i++) {
              for (let j = 0; j < arr.length; j++) {
                if (ids[i] == arr[j].order) {
                  newArr.push(arr[j]);
                }
              }
            }
            this.imgname = newArr;
          });
        }
      });
    },

    gobaidu() {
      if (this.lottery[this.gid].type == 0 && this.qgcGid[this.gid]) { //全国彩
        window.location.href = 'http://h.5106cai.com/'+this.qgcGid[this.gid].adUrl+'/?cf=kj#/'
      }else if(this.lottery[this.gid].type == 1){ //地方彩
        window.location.href = 'http://h.5106cai.com/regit_active/?cf=kj1#/'
      }else{ //高频彩
         window.location.href = 'http://h.5106cai.com/regit_active/?cf=kj2#/'
      }
    },
    goUrl(item){
      if (item.type == 'change') {
        let url = 'http://myq.15988.com/#/jiedu-list;type='+this.qgcGid[this.gid].typeID;
        window.location.href = url
      }else{
        window.location.href = item.url
      }
    },
  },

  created() {
    this.gid = this.$router.currentRoute.query.gid;
    this.gidType = this.lottery[this.gid].type;
    this.gethotlist();
    this.getAdverti();
    if (this.lottery[this.gid].type == 0 && this.qgcGid[this.gid]) {
      this.PhoneShow = require('@/assets/zst/'+this.qgcGid[this.gid].imgUrl)
    }else{
      this.PhoneShow = require('@/assets/zst/288.png');
    }
    
    for (var key in this.$router.currentRoute.query) {
      if (key == "cfrm") {
        this.backimgBolean = false;
      }
    }

    // 获取地址传递的参数
    this.second = this.$router.currentRoute.query.gid;
    // 判断是否显示直播回放
    if (
      this.second == "01" ||
      this.second == "03" ||
      this.second == "07" ||
      this.second == "50" ||
      this.second == "51" ||
      this.second == "52" ||
      this.second == "53"
    )
      this.historyBoolean = true;

    if (this.second == "80" || this.second == "83" || this.second == "82") {
      this.zstBoolean = false;
    }

    getcontent({
      gid: this.$router.currentRoute.query.gid,
      pid: this.$router.currentRoute.query.pid
    }).then(res => {
      this.lotteryname = res.data.data.data.lotname;
      this.pid = res.data.data.data.pid;
      this.awardWeek = res.data.data.data.awardWeek;
      this.awardtime = res.data.data.data.awardtime;
      this.realsale = res.data.data.data.realsale?res.data.data.data.realsale:'0';

      if (this.realsale == "") this.gaopon = false;

      this.realmoney =res.data.data.data.realmoney?res.data.data.data.realmoney.indexOf('.00')>-1?res.data.data.data.realmoney.split('.')[0]:res.data.data.data.realmoney:'0';
      if (res.data.data.data.match) {
        this.match = JSON.parse(res.data.data.data.match);
      }

      this.ballarry = res.data.data.data.awardcode.split(",");

      this.arrlengtj = this.ballarry.length;
      // this.gonggao = res.data.awardcode.split(",");
      // 上部分为操作 蓝色的球 下部分为操作 红色球

      this.redList = res.data.data.data.awardcode.split(",");
      this.BlueList = res.data.data.data.bluecode.split(",");

      //判断 红球是否过多
      for (var i = 0; i < this.BlueList.length; i++) {
        if (this.BlueList[i] == "") {
          this.BlueList.shift();
        }
      }

      // 奖项说明
      this.gonggaoList = res.data.data.data.gonggao.split(";");    
      if (this.gonggaoList[0] == false) {this.tableShow = false};
      for (var i = 0; i < this.gonggaoList.length; i++) {
        let item =  this.gonggaoList[i];
        if (!item) {
          return
        }else{
          var obj = {};
          obj.name =item.split("|")[0];
          obj.num = item.split("|")[1];
          obj.allNum = item.split("|")[2];
          obj.playmethod = item.split("|")[3];
          this.gonggaoListAyy.push(obj);
          if (obj.playmethod) {
            this.tableplay = true;
          }
        }
      }
    });


    //部分彩种加载详情
    let typeID = this.qgcGid[this.gid]?this.qgcGid[this.gid].typeID:null;
    let pid = this.$router.currentRoute.query.pid;
    if (typeID) {
      instance2({
        url: "/static/kjgg/pages/"+typeID+"/kjgg_digital_recommends.js",
      }).then(v=>{
        let data = v.data.currentSaleData;
        this.recommendsArray = data
      })
      if (typeID == '201') {
        pid = pid.substring(2)
      }
      instance2({
        url: "/static/kjgg/pages/"+typeID+"/kjgg_digital_recommends_"+pid+".js",
      }).then(v=>{
        let data = v.data.historySaleData;
        this.recommendsData = data
        this.recommendsDataArray = data.openDetailList
        this.recommendsDataArrayBigPrize = data.openDetailPrizeList
      })
    }
    this.getExperInfo();
   
  }
};
</script>
<style lang="less" scoped>
  @import 'style.less';
</style>

<style>
.my-swipe .van-swipe-item {
  height: 1.21rem;
  color: #fff;
  font-size: 20px;
  text-align: center;
}
.my-swipe .van-swipe-item > img {
  height: 100%;
  display: inline-block;
}
.bjball {
  position: absolute;
  display: flex;
  top: 0.7rem;
  width: 100%;
  left: 0;
  flex-wrap: wrap;
  justify-content: center;
}
.bjball li {
  width: 0.28rem !important;
  height: 0.28rem !important;
  border-radius: 50% !important;
  background: #f84848 !important;
  color: #ffffff !important;
  margin-right: 0.05rem !important;
  font-size: 0.16rem !important;
  line-height: 0.28rem !important;
  text-align: center !important;
  margin-top: 0.02rem !important;
  margin-bottom: auto;
}

.hieedn {
  visibility: hidden;
}
.right_btn {
  display: flex;
}
.jiangli th {
  width: 33.3%;
}
.details {
  width: 100%;
  height: 100%;
}
.containie_img img {
  /* width: 100%;    */
}

.headertab {
  background: #f7f7fa;
  color: #999999;
  font-size: 0.16rem;
}
.headertab tr {
  height: 0.3rem;
}

.redcol {
  color: #f84948;
}
.block {
  position: fixed;
  z-index: 1000;
  right:15px;
  width: auto;
  height: 0.8rem;
  bottom: 30%;
}

.newLI {
  width: 0.2rem !important;
  height: 0.36rem;
  border-radius: 0.03rem !important;
  background: #f84848;
  color: #ffffff;
  margin-right: 0.03rem !important;
  font-size: 0.16rem;
  line-height: 0.36rem;
  text-align: center;
}
.blue {
  background: #5187ff !important;
}
.keng {
  position: relative;
}
.icent {
  position: absolute;
  width: 100%;
  top: 0;
  margin-left: 0.2rem;
}
.back {
  width: 0.4rem;
  position: absolute;
  left: 0;
  top: 0;
  height: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.containie_img {
  width: 100%;
}
.containie_img img {
  width: 100%;
}
.details_header {
  position: fixed;
  top: 0;
  height: 0.4rem;
  z-index: 100;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.18rem;
  font-family: PingFangSC-Medium, PingFang SC;
  font-weight: 500;
  color: rgba(51, 51, 51, 1);
  background: #fff;
}
.imgPsion {
  position: absolute;
  right: 0.1rem;
}
.containier {
  padding-top: 0.45rem;
  background: #f5f5f5;
  /* height: 100%; */
  position: relative;
}
.containier_box {
  position: relative;
  padding: 0.1rem 0rem 0;
  box-sizing: content-box;
}
/* 最新的盒子 */
.newBoxStyle {
  position: relative;
  height: 1.8rem;
  background: #fff;
  padding: 0.1rem;
  box-sizing: border-box;
  display: flex;
  border-radius: 0.05rem;
}

/* 盒子的大小 */
.details_box {
  position: relative;
  /*height: 1.93rem;*/
  background: #fff;
  padding: 0.1rem;
  box-sizing: border-box;
  border-radius: 0.05rem;
  margin:0 .15rem .1rem;
}
.details_box_top{
  display: flex;
  justify-content: space-between;
}
.details_box_first {
  width: 1.8rem;
  height: 0.5rem;
  display: flex;
  flex-direction: column;
}
.details_box_first h1 {
  font-size: 0.16rem;
  font-weight: 600;
  color: rgba(51, 51, 51, 1);
  line-height: 22px;
  font-size: 0.15rem;
}
.details_box_first span {
  width: 1.15rem;
  height: 0.17rem;
  font-size: 0.12rem;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: rgba(153, 153, 153, 1);
  line-height: 0.17rem;
}
.details_btn {
  margin-top: 0.05em;
  width: 0.78rem;
  height: 0.32rem;
  font-size: 0.13rem;
  font-weight: 400;
  color: #666666;
  line-height: 0.32rem;
  background: #f5f5f5;
  text-align: center;
  margin-left: 0.1rem;
  float: right;
}
.box_list {
  position: absolute;
  display: flex;
  top: 0.75rem;
  left: 0;
  justify-content: center;
  flex-wrap: wrap;
  width: 98%;
}

.box_list li {
  width: 0.36rem;
  height: 0.36rem;
  border-radius: 50%;
  background: #f84848;
  color: #ffffff;
  margin-right: 0.05rem;
  font-size: 0.16rem;
  line-height: 0.36rem;
  text-align: center;
  margin-bottom: 0.05rem;
}
.box_shop {
  width: 100%;
  margin: 50px auto 0;
  overflow: hidden;
}
.box_shop li {
  float: left;
  width: 50%;
}
.query_shop {
  margin-top: 0.1rem;
  text-align: center;
  color: #666666;
  font-size: 0.12rem;
}
.query_num {
  margin-top: 0.1rem;
  text-align: center;
  color: #f95d6b;
  font-size: 0.17rem;
}
/* table */

table {
  width: 100%;
}
th {
  color: #999999;
  font-size: 0.12rem;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  text-align: center;
}
td {
  text-align: center;
  height: 0.4rem;
  font-size: 0.12rem;
}

.tabbar_bottom {
  display: flex;
  justify-content: space-around;
  /*border-top: 0.1rem solid #f5f5f5;*/
  border-bottom: 0.1rem solid #f5f5f5;
}
.tabbar_bottom li {
  width: 30%;
  height: 0.32rem;
  font-size: 0.13rem;
  text-align: center;
  line-height: 0.32rem;
  background: #fbf8f8;
  border-radius: 0.05rem;
  color: #666666;
  margin: 0.1rem 0;
}

.information {
  padding: 0.1rem 0;
}
.information h3 {
  font-size: 0.15rem;
  color: #333333;
  font-weight: 500;
  line-height: 0.21rem;
}
.information li {
  font-size: 0.12rem;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: rgba(102, 102, 102, 1);
  line-height: 17px;
  margin: 0.14rem 0;
  padding: 0.07rem 0;
  border-bottom: 1px solid #d8d8d8;
}
.Hotnews {
  width: 100%;
  padding: 0.1rem 0.15rem;
  box-sizing: border-box;
}
.Hotnews h3 {
  color: #333333;
  font-size: 0.15rem;
  margin: 0.1rem 0;
}
.Hotnews li {
  font-size: 0.13rem;
  padding: 0.1rem 0;
  color: #666666;
  border-bottom: 0.01rem solid #d8d8d8;
}

.footer {
  width: 0.62rem;
  height: 0.21rem;
  font-size: 0.15rem;
  font-family: PingFangSC-Medium, PingFang SC;
  font-weight: 500;
  color: rgba(51, 51, 51, 1);
  line-height: 0.21rem;
  padding-top: 0.13rem;
}
.borderbtn {
  width: 100%;
  margin-bottom: 0.1rem;
}
.borderbtn > ul {
  width: 100%;
}
.borderbtn > ul > li {
  height: 0.41rem;
  font-size: 0.13rem;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: rgba(102, 102, 102, 1);
  line-height: 0.41rem;
  border-bottom: 0.01rem dashed #d8d8d8;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
</style>